package test.app.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.userdetails.UserDetails;

@Entity
@Table(name = "USUARIO")
public class Usuario extends BaseObject implements UserDetails {

	private static final long serialVersionUID = 5165073496386399689L;
	 
	@Id 
	@Column(name = "USERNAME", nullable = false)
	private String username; // requerido por acegi

	@Column(name = "PASSWORD", nullable = false)
	private String password; // requerido por acegi

	@Column(name = "PERMISOS", nullable = false)
	private Integer permisos; //
	
	public Usuario() 
	{
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
	
	public String getUsername()
	{
		return username; 
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPassword()
	{
		return password;
	}
	
	public Integer getPermisos() {
		return permisos;
	}

	public void setPermisos(Integer permisos) {
		this.permisos = permisos;
	}
	
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public GrantedAuthority[] getAuthorities() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean isAccountNonExpired() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean isAccountNonLocked() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean isCredentialsNonExpired() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean isEnabled() {
		// TODO Auto-generated method stub
		return false;
	}
	
}
